home *** CD-ROM | disk | FTP | other *** search
/ 64'er 1990 January / 64er_Magazin_90-01_1990_Markt__Technik_de_Side_A.d64 / quelltext 1 (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  10KB  |  420 lines

  1. 10 :          sys 36864
  2. 15 :          .opt   oo
  3. 20 :          *=$c000
  4. 25 :;
  5. 30 listen = $ffb1
  6. 35 second = $ff93
  7. 40 iecout = $ffa8
  8. 45 unlstn = $ffae
  9. 50 diskname = $0480
  10. 55 chrout = $ffd2
  11. 60 cint = $e518
  12. 65 chrin = $ffcf
  13. 70 get = $ffe4
  14. 75 iecin = $ffa5
  15. 80 talk = $ffb4
  16. 85 untalk = $ffab
  17. 90 talksa = $ff96
  18. 95 plot = $fff0
  19. 100 :;
  20. 105 :;
  21. 110 :;****** bildschirmaufbau *******
  22. 115 :;
  23. 120 menu       ldx #0
  24. 125 :          lda #32
  25. 130 clrname    sta name,x
  26. 135 :          inx
  27. 140 :          cpx #16
  28. 145 :          bcc clrname
  29. 150 :          sta id1+1
  30. 155 :          sta id1+2
  31. 160 :          jsr cint
  32. 165 :          lda #0
  33. 170 :          sta 53280
  34. 175 :          sta 53281
  35. 180 :          lda #<(screen)
  36. 185 :          sta $fb
  37. 190 :          lda #>(screen)
  38. 195 :          sta $fc
  39. 200 :          ldy #0
  40. 205 output1    lda ($fb),y
  41. 210 :          jsr chrout
  42. 215 :          iny
  43. 220 :          bne chkend
  44. 225 :          inc $fc
  45. 230 chkend     cmp #160
  46. 235 :          bne output1
  47. 240 :          ldx #$ff
  48. 245 input1     jsr chrin
  49. 250 :          cmp #13
  50. 255 :          beq (NULL)tname
  51. 260 :          inx
  52. 265 :          cpx #16
  53. 270 :          bcs input1
  54. 275 :          sta name,x
  55. 280 :          bcc input1
  56. 285 (NULL)tname    ldy #0
  57. 290 output2    lda id2,y
  58. 295 :          jsr chrout
  59. 300 :          iny
  60. 305 :          cmp #160
  61. 310 :          bne output2
  62. 315 :          ldx #$ff
  63. 320 input2     jsr chrin
  64. 325 :          cmp #13
  65. 330 :          beq start
  66. 335 :          inx
  67. 340 :          cpx #2
  68. 345 :          bcs input2
  69. 350 :          sta id1+1,x
  70. 355 :          bcc input2
  71. 360 start     lda #<(frmtrack)
  72. 365 :         sta $fb
  73. 370 :         lda #>(frmtrack)
  74. 375 :         sta $fc
  75. 380 :         lda #<(bufferwrt)
  76. 385 :         sta $fd
  77. 390 :         lda #>(bufferwrt)
  78. 395 :         sta $fe
  79. 400 :         lda #$0a
  80. 405 :         sta $57
  81. 410 :         lda #$04
  82. 415 :         sta $58
  83. 420 :         jsr bufferwrt
  84. 425 :         lda #0
  85. 430 :         sta $90
  86. 435 :         lda #8
  87. 440 :         jsr listen
  88. 445 :         lda #$6f
  89. 450 :         jsr second
  90. 455 :         lda $90
  91. 460 :         bmi deverr
  92. 465 :         jsr unlstn
  93. 470 :         lda #8
  94. 475 :         jsr talk
  95. 480 :         lda #$6f
  96. 485 :         jsr talksa
  97. 490 :         ldx #0
  98. 495 errin     jsr iecin
  99. 500 :         sta $0200,x
  100. 505 :         inx
  101. 510 :         cmp #13
  102. 515 :         bne errin
  103. 520 :         jsr untalk
  104. 525 :         lda $0200
  105. 530 :         cmp #"0"
  106. 535 :         bne error
  107. 540 :         lda $0201
  108. 545 :         cmp #"0"
  109. 550 :         bne error
  110. 555 :         jmp menu
  111. 560 :;
  112. 565 deverr    ldx #$ff
  113. 570 dev       inx
  114. 575 :         lda $a1d0,x
  115. 580 :         sta $0200,x
  116. 585 :         bpl dev
  117. 590 :         and #$7f
  118. 595 :         sta $0200,x
  119. 600 :         inx
  120. 605 :         lda #13
  121. 610 :         sta $0200,x
  122. 615 error     inc 199
  123. 620 :         stx 2
  124. 625 :         ldx #20
  125. 630 :         lda #40
  126. 635 :         sec
  127. 640 :         sbc 2
  128. 645 :         lsr
  129. 650 :         tay
  130. 655 :         clc
  131. 660 :         jsr plot
  132. 665 :         ldx #0
  133. 670 errout    lda $0200,x
  134. 675 :         jsr chrout
  135. 680 :         inx
  136. 685 :         cmp #13
  137. 690 :         bne errout
  138. 695 :         lsr 199
  139. 700 inkey     jsr get
  140. 705 :         beq inkey
  141. 710 :         jmp menu
  142. 715 :;
  143. 720 :;****** format-irqprogramm ******
  144. 725 :;
  145. 730 frmtrack  lda $1c00
  146. 735 :         and #$10
  147. 740 :         bne diskready
  148. 745 :         lda #8
  149. 750 :         jmp $f969
  150. 755 diskready lda $1c0c
  151. 760 :         and #$1f
  152. 765 :         ora #$c0
  153. 770 :         sta $1c0c
  154. 775 :         lda #$ff
  155. 780 :         sta $1c03
  156. 785 :         lda #$55
  157. 790 :         sta $1c01
  158. 795 :         lda $06
  159. 800 :         jsr $f24b
  160. 805 :         sta $43
  161. 810 :         ldy #0
  162. 815 :         sty $07
  163. 820 setheader lda #8
  164. 825 :         sta $0700,y
  165. 830 :         iny
  166. 835 :         lda #0
  167. 840 :         eor $07
  168. 845 :         eor $06
  169. 850 :         eor $13
  170. 855 :         eor $12
  171. 860 :         sta $0700,y
  172. 865 :         iny
  173. 870 :         lda $07
  174. 875 :         sta $0700,y
  175. 880 :         iny
  176. 885 :         lda $06
  177. 890 :         sta $0700,y
  178. 895 :         iny
  179. 900 :         lda $13
  180. 905 :         sta $0700,y
  181. 910 :         iny
  182. 915 :         lda $12
  183. 920 :         sta $0700,y
  184. 925 :         iny
  185. 930 :         lda #$0f
  186. 935 :         sta $0700,y
  187. 940 :         iny
  188. 945 :         sta $0700,y
  189. 950 :         iny
  190. 955 :         inc $07
  191. 960 :         lda $07
  192. 965 :         cmp $43
  193. 970 :         bcc setheader
  194. 975 :         tya:pha
  195. 980 :         lda #7
  196. 985 :         sta $31
  197. 990 :         jsr $fe30
  198. 995 :         pla:tay
  199. 1000 :         dey
  200. 1005 moveblk   lda $0700,y
  201. 1010 :         sta $0745,y
  202. 1015 :         dey
  203. 1020 :         bne moveblk
  204. 1025 :         lda $0700
  205. 1030 :         sta $0745
  206. 1035 :         ldy #$44
  207. 1040 moverest  lda $01bb,y
  208. 1045 :         sta ($30),y
  209. 1050 :         dey
  210. 1055 :         bpl moverest
  211. 1060 :         lda #5
  212. 1065 :         sta $31
  213. 1070 :         lda #00
  214. 1075 :         sta $32
  215. 1080 nextblock lda #$ff
  216. 1085 :         sta $1c01
  217. 1090 :         ldx #5
  218. 1095 sync      bvc sync
  219. 1100 :         clv
  220. 1105 :         dex
  221. 1110 :         bne sync
  222. 1115 :         ldx #$0a
  223. 1120 :         ldy $32
  224. 1125 writehead bvc writehead
  225. 1130 :         clv
  226. 1135 :         lda $0700,y
  227. 1140 :         sta $1c01
  228. 1145 :         iny
  229. 1150 :         dex
  230. 1155 :         bne writehead
  231. 1160 :         ldx #9
  232. 1165 :         sty $32
  233. 1170 headergap bvc headergap
  234. 1175 :         clv
  235. 1180 :         lda #$55
  236. 1185 :         sta $1c01
  237. 1190 :         dex
  238. 1195 :         bne headergap
  239. 1200 :         lda #$ff
  240. 1205 :         ldx #5
  241. 1210 blocksync bvc blocksync
  242. 1215 :         clv
  243. 1220 :         sta $1c01
  244. 1225 :         dex
  245. 1230 :         bne blocksync
  246. 1235 :         ldx #$bb
  247. 1240 wrtblk1   bvc wrtblk1
  248. 1245 :         clv
  249. 1250 :         lda $0600,x
  250. 1255 :         sta $1c01
  251. 1260 :         inx
  252. 1265 :         bne wrtblk1
  253. 1270 :         ldy #$00
  254. 1275 wrtblk2   bvc wrtblk2
  255. 1280 :         clv
  256. 1285 :         lda ($30),y
  257. 1290 :         sta $1c01
  258. 1295 :         iny
  259. 1300 :         bne wrtblk2
  260. 1305 :         lda #$55
  261. 1310 :         ldx #9
  262. 1315 sectorgap bvc sectorgap
  263. 1320 :         clv
  264. 1325 :         sta $1c01
  265. 1330 :         dex
  266. 1335 :         bne sectorgap
  267. 1340 :         dec $07
  268. 1345 :         bne nextblock
  269. 1350 wait      bvc wait
  270. 1355 :         clv
  271. 1360 wait2     bvc wait2
  272. 1365 :         clv
  273. 1370 :         jsr $fe00
  274. 1375 :         lda #1
  275. 1380 :         jmp $f969
  276. 1385 :;
  277. 1390 :;***** format-hauptprogramm *****
  278. 1395 :;
  279. 1400 :         lda #15
  280. 1405 :         sta $1c07
  281. 1410 :         jsr $c118
  282. 1415 :         lda #$01
  283. 1420 :         sta $06
  284. 1425 :         sta $07
  285. 1430 :         lda #$c0
  286. 1435 :         sta $00
  287. 1440 bump      lda $00
  288. 1445 :         bmi bump
  289. 1450 stepper   lda $4a
  290. 1455 :         bmi stepper
  291. 1460 :         ldx #$ff
  292. 1465 writename inx
  293. 1470 :         lda diskname,x
  294. 1475 :         sta $0200,x
  295. 1480 :         bne writename
  296. 1485 :         ldy #16
  297. 1490 :         sty $0274
  298. 1495 :         iny
  299. 1500 :         lda $0200,y
  300. 1505 :         sta $12
  301. 1510 :         iny
  302. 1515 :         lda $0200,y
  303. 1520 :         sta $13
  304. 1525 nexttrack ldy #0
  305. 1530 :         sty $30
  306. 1535 :         lda #5
  307. 1540 :         sta $31
  308. 1545 :         lda #$4b
  309. 1550 clrbuffer sta ($30),y
  310. 1555 :         lda #$01
  311. 1560 :         iny
  312. 1565 :         bne clrbuffer
  313. 1570 :         ldx #0
  314. 1575 :         jsr $f5e9
  315. 1580 :         sta $3a
  316. 1585 :         jsr $f78f
  317. 1590 :         ldx #$bb
  318. 1595 savebuff  lda $0100,x
  319. 1600 :         sta $0600,x
  320. 1605 :         inx
  321. 1610 :         bne savebuff
  322. 1615 :         lda #$e0
  323. 1620 :         sta $00
  324. 1625 format    lda $00
  325. 1630 :         bmi format
  326. 1635 :         cmp #2
  327. 1640 :         bcc ok
  328. 1645 :         jmp $e60a
  329. 1650 ok        inc $06
  330. 1655 :         lda $06
  331. 1660 :         cmp #36
  332. 1665 :         bcc nexttrack
  333. 1670 :         jmp $ee40
  334. 1675 name     .asc "                "
  335. 1680 id1      .asc ",  "
  336. 1685 :        .byt 0
  337. 1690 :;
  338. 1695 :;****** floppy-prg senden *******
  339. 1700 :;
  340. 1705 bufferwrt ldy #0
  341. 1710 :         sty $5f
  342. 1715 :         lda #3
  343. 1720 :         sta $60
  344. 1725 sendprg   ldx #30
  345. 1730 :         lda #8
  346. 1735 :         jsr listen
  347. 1740 :         lda #$6f
  348. 1745 :         jsr second
  349. 1750 :         lda #"m"
  350. 1755 :         jsr iecout
  351. 1760 :         lda #"-"
  352. 1765 :         jsr iecout
  353. 1770 :         lda #"w"
  354. 1775 :         jsr iecout
  355. 1780 :         lda $5f
  356. 1785 :         jsr iecout
  357. 1790 :         lda $60
  358. 1795 :         jsr iecout
  359. 1800 :         txa
  360. 1805 :         jsr iecout
  361. 1810 sendpart  lda ($fb),y
  362. 1815 :         jsr iecout
  363. 1820 :         iny
  364. 1825 :         dex
  365. 1830 :         bne sendpart
  366. 1835 :         jsr unlstn
  367. 1840 :         clc
  368. 1845 :         tya
  369. 1850 :         adc $fb
  370. 1855 :         sta $fb
  371. 1860 :         bcc dpointer
  372. 1865 :         inc $fc
  373. 1870 dpointer  clc
  374. 1875 :         tya
  375. 1880 :         adc $5f
  376. 1885 :         sta $5f
  377. 1890 :         bcc nextpart
  378. 1895 :         inc $60
  379. 1900 nextpart  ldy #0
  380. 1905 :         lda $fc
  381. 1910 :         cmp $fe
  382. 1915 :         bcc sendprg
  383. 1920 :         bne execute
  384. 1925 :         lda $fb
  385. 1930 :         cmp $fd
  386. 1935 :         bcc sendprg
  387. 1940 execute   lda #8
  388. 1945 :         jsr listen
  389. 1950 :         lda #$6f
  390. 1955 :         jsr second
  391. 1960 :         lda #"m"
  392. 1965 :         jsr iecout
  393. 1970 :         lda #"-"
  394. 1975 :         jsr iecout
  395. 1980 :         lda #"e"
  396. 1985 :         jsr iecout
  397. 1990 :         lda $57
  398. 1995 :         jsr iecout
  399. 2000 :         lda $58
  400. 2005 :         jsr iecout
  401. 2010 :         jmp unlstn
  402. 2015 :;
  403. 2020 screen   .asc "[147][155]        [176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
  404. 2025 :        .byt 13
  405. 2030 :        .asc "        [221]     quickformat     [221]"
  406. 2035 :        .byt 13
  407. 2040 :        .asc "        [221]                     [221]"
  408. 2045 :        .byt 13
  409. 2050 :        .asc "        [221]   written in 1989   [221]"
  410. 2055 :        .byt 13
  411. 2060 :        .asc "        [221] by marcel sommerick [221]"
  412. 2065 :        .byt 13
  413. 2070 :        .asc "        [173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]"
  414. 2075 :        .byt 13
  415. 2080 :        .asc "        diskname:"
  416. 2085 :        .byt 160
  417. 2090 id2      .byt 13
  418. 2095 :        .asc "        id:"
  419. 2100 :        .byt 160
  420.